<%@ page language="java" contentType="text/html; charset=UTF-8"

pageEncoding="UTF-8"%>



<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<html>

<jsp:include page="header.jsp"/>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>Arşivimin Listesi</title>

	<style>

		body{

		font-family:Tahoma, Geneva, sans-serif;

		font-size:13px;

		padding:200px;

		

		}

	</style>

	<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">

	</script> <!-- import jquery -->

	<script>

	$(document).ready(function(){

		$(".hide").hide();

		});

	</script>

	<script>

	$(document).ready(function(){

		  $(".show").click(function(){

			var i= $(this).attr("id");

			$("#hd"+i).fadeToggle();

		  });

		});

	</script>

</head>

<link href="css/style.css" rel="stylesheet" type="text/css" />



	<body>

		<div class="content">

			<div class="wrapperf">

				<div class="search-list">

					<h3>Arşivim</h3>

					<p style="color: red">

					<% if(session.getAttribute("delete") == "valid"){

					if (session.getAttribute("validDelete") == "valid" ) {%>

					Silme işlemi başarı ile gerçekleşmiştir.

					<%}if (session.getAttribute("invalidDelete") == "invalid" ) {%>

					Silmek istediğiniz ürün başkasının kataloğunda bulunmaktadır.

					<%}

					}%>

					<table>

						<thead>

							<tr>

							<td width="50"><a href="#"></a></td>

							<td width="250" height="auto"><a href="#">kitabın / filmin ismi</a></td>

							<td width="250" height="auto"><a href="#">yönetmen / yazar </a></td>

							<td width="50" height="auto">sahibi</td>

							<td width="70"></td>

							<td width="40"></td>

							

							</tr>

						</thead>

						<tbody>

							<c:forEach var="item" items="${mycatalog}">

								<tr>

								<c:if test='${item.type eq "kitap"}'>

									<td style="text-align: center;vertical-align: middle;">

									<img src="images/ktp-icon.jpg" width="30" height="20" class="show" id="${item.itemID}"/>

									</td>

								</c:if>

								<c:if test='${item.type eq "film"}'>

									<td style="text-align: center;vertical-align: middle;">

									<a href="items?action=view&itemID=${item.itemID}">

									<img src="images/cd-icon.jpg" width="30" height="20"/>

									</a></td>

								</c:if>

								<td><a href="#">${item.i_name}</a></td>

								<td><a href="#">${item.y_name}</a></td>

								<td>${item.owner}</td>

								<td style="text-align: center;vertical-align: middle;">

								<a href="items?action=view&itemID=${item.itemID}">

								<img src="images/edit.jpg" width="15" height="15"/>düzeltme</a></td>

								<td style="text-align: center;vertical-align: middle;">

								<a href="items?id=${item.itemID }&action=delete">

								<img src="images/del.jpg" width="15" height="15"/>sil</a></td>

								</tr>

								<tr class="hide" id="hd${item.itemID}">

								<td></td>

								<td>

								<p id="hd${item.itemID}">${item.desc}</p></td>

								</tr>

							</c:forEach>

						</tbody>

					</table>

					<table align="right">

						<tr style="text-align: center;vertical-align: middle;">

						<td>

						<a href="#">ilk sayfa<img src="images/resultset_first.png" width="30" height="20"/></a>

						<a href="#"><img src="images/resultset_previous.png" width="30" height="20"/></a>

						<a href="#"><img src="images/resultset_next.png" width="30" height="20"/></a>

						<a href="#"><img src="images/resultset_last.png" width="30" height="20"/>son sayfa</a>

						</td>

						</tr>

					</table>

				</div>

			</div>

		</div>

	</body>

</html>